package com.sghj.config;

import org.springframework.boot.web.servlet.MultipartConfigFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import javax.servlet.MultipartConfigElement;

@Configuration
public class fileConfig {
    @Bean
    MultipartConfigElement multipartConfigElement() {
        //设置临时文件
        MultipartConfigFactory factory = new MultipartConfigFactory();
// //       factory.setLocation("/home/ubuntu/resource");
        //factory.setLocation("E:\\project\\jgwfstoGitee");这个不要啦
//        factory.setLocation("C:\\recdata");不要啦
        return factory.createMultipartConfig();
    }
}
